﻿using Slate.ActionClips;
using UniFramework.Battle;
using UnityEngine;

namespace UniFramework.Skill
{
	public abstract class SkillBaseClip : ActorActionClip
	{
		public int InFrameCntEditorReadOnly = -1;
		public int OutEditorFrameCntEditorReadOnly = -1;
		[SerializeField] [HideInInspector] private float _length = 0.001f;

		public override float length
		{
			get { return _length; }
			set { _length = value; }
		}

		public abstract object GetData();

		public abstract void RefreshTime();

#if UNITY_EDITOR
		protected override void OnClipGUI(Rect rect)
		{
			InFrameCntEditorReadOnly = LogicFrameConfig.GetFrameCnt(startTime);
			OutEditorFrameCntEditorReadOnly = LogicFrameConfig.GetFrameCnt(endTime);
		}
#endif
	}
}